/**
 * A class to display configuration
 */
import java.awt.Dimension;
import java.io.IOException;
import java.net.URL;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JFrame;
/**
 * @author Master
 * @version $Revision: 1.0 $
 */
public class ConfigurationScreen{
	/**
	 * Field ONE.
	 * (value is 1000)
	 */
	private static final int ONE = 1000;
	
	/**
	 * Field SIX.
	 * (value is 600)
	 */
	private static final int SIX = 600;

	/**
	 * Method toString.
	
	 * @return String */
	@Override
	public String toString() {
		return "ConfigurationScreen []";
	}
	
	/**
	 * Field myFrame.
	 */
	public static JFrame MyFrame=null;
	
	/**
	 * Method main.
	 * @param args String[]
	 */
	public static void main(String[]args){
		 MyFrame=new JFrame("Space Trader");
		 MyFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		 MyFrame.getContentPane().add(new InitialConfigurationScreen());
		 MyFrame.setPreferredSize(new Dimension(ONE, SIX));
		 MyFrame.pack();
		 MyFrame.setVisible(true);
		 //new ConfigurationScreen();
	   }
	
	//BGM STUFF
	/**
	 * Constructor for ConfigurationScreen.
	 */
	public ConfigurationScreen() {
	 try {
         // Open an audio input stream.  
		//File soundFile = new File("Halo Theme Mjolnir Mix.WAV"); 
		 //AudioInputStream audioIn = AudioSystem.getAudioInputStream(soundFile);
		 final URL url = new URL(
				 "http://dl.dropbox.com/u/53152720/Halo%20Theme%20Mjolnir%20Mix.wav");
		 
		 final AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);
		 
         // Get a sound clip resource.
		 final Clip clip = AudioSystem.getClip();
       
         // Open audio clip and load samples from the audio input stream.
         clip.open(audioIn);
         
         clip.start();
      } 
	 
	 	catch (UnsupportedAudioFileException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      } catch (LineUnavailableException e) {
         e.printStackTrace();
      }
	 
	}
	
}
